<%@page import="co.gov.medellin.ssti.sub.model.dao.exception.DAOException"%>
<%@page import="co.gov.medellin.ssti.sub.model.vo.SubprogramaVO"%>
<%@page import="java.util.Collection"%>
<%@page import="co.gov.medellin.ssti.sub.service.ConsultasService"%>
<%@ page contentType="text/html;charset=utf-8"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="<%= request.getContextPath() + "/css/bloques.css" %>"
	rel="stylesheet" type="text/css">
<title>Detalle Subprograma</title>
<script type="text/javascript">
       
       function fModificar(){
        document.form.submit();
        }
        
         function fNuevo(){
         location.href = "IngresarSubprograma.jsp";
        }
    </script>
</head>
<body>

	<P>&nbsp;</P>
	<P>&nbsp;</P>
	<P>&nbsp;</P>
	<P align="center" class="titulosenblanco">ADMINISTRACI&Oacute;N DE
		SUBPROGRAMA</P>
	<P>&nbsp;</P>
	<form name="form" method="get"
		action="../../servlets/subprogramas/ingresarsubprograma">
		<div align="center">
		<table class="tablaGenericaWidth70">
			<%
String strsubpgr = request.getParameter("Codigo");
String strnomsub = "";
String strpgr = "";
String strarea = "";
String strdescrip = "";
String strutil = "";
String strvalor = "";
String strvigencia = "";
String stradmon = "";
String strdesde = "";
String strhasta = "";
String strestudiantes = "";
String strsisben = "";
String strgrupo = "";

ConsultasService consulta = new ConsultasService();
Collection<SubprogramaVO> rs = null;

 rs = consulta.getDetSubpgr(strsubpgr);
 
    if (rs != null){
     try{
       for(SubprogramaVO vo : rs){
          strnomsub = vo.getNombre();       
          strpgr = vo.getNombrePrograma();
          strarea = vo.getNombreArea();
          strdescrip = vo.getDescripcion();
          strutil = vo.getDiasReutilizar();
          strvalor = vo.getValorUnitarioBeneficio();
          strdesde = vo.getDesdeVigencia();
          strhasta = vo.getHastaVigencia();
          strgrupo = vo.getGrupoFamiliar();
          strestudiantes = vo.getValidarEstud();
          strsisben = vo.getValidarSisben();
          strvigencia = vo.getVigencia();
          stradmon = vo.getNombreUsuario();  
          }
        }catch(DAOException e){
            e.printStackTrace();
        }
          }else{%>
			<tr>
				<td colspan="2"><font>Ocurrio un error, al realizar la
						consulta</font></td>
			</tr>
			
				<% }%>			

			<tr>
				<td width="8%">
					<DIV align="center">&nbsp;</DIV>
				</td>
				<td width="12%" class="celdatabla">Nombre</td>
				<td width="80%"><input type="text" class="form"
					name="subprograma" value="<%=strnomsub%>" maxlength="40" size="40"
					readonly /></td>
			</tr>
			<tr>
				<td width="8%">&nbsp;</td>
				<td width="12%" class="celdatabla">Programa</td>
				<td width="80%"><input type="text" class="form"
					value="<%=strpgr%>" maxlength="40" size="40" readonly /></td>
			</tr>
			<tr>
				<td width="8%">&nbsp;</td>
				<td width="12%" class="celdatabla">Secretaria</td>
				<td width="80%"><input type="text" class="form"
					value="<%=strarea%>" maxlength="40" size="40" readonly /></td>
			</tr>
			<tr>
				<td width="8%">&nbsp;</td>
				<td width="12%" class="celdatabla">Descripcion</td>
				<td width="80%"><textarea name="descripcion" class="form"
						cols="40" rows="5" readonly disabled><%=strdescrip%></textarea></td>
			</tr>
			<tr>
				<td width="8%">&nbsp;</td>
				<td width="12%" class="celdatabla">Utilizaci&oacute;n</td>
				<td width="80%"><input type="text" class="form" name="diasutil"
					value="<%=strutil%>" maxlength="15" size="15" readonly /></td>
			</tr>
			<tr>
				<td width="8%">&nbsp;</td>
				<td width="12%" class="celdatabla">Valor</td>
				<td width="80%"><input type="text" class="form" name="valor"
					value="<%=strvalor%>" maxlength="30" size="30" readonly /></td>
			</tr>
			<tr>
				<td width="8%">&nbsp;</td>
				<td width="12%" class="celdatabla">Desde</td>
				<td width="80%"><input type="text" class="form" name="valor"
					value="<%=strdesde%>" maxlength="11" size="11" readonly /></td>
			</tr>
			<tr>
				<td width="8%">&nbsp;</td>
				<td width="12%" class="celdatabla">Hasta</td>
				<td width="80%"><input type="text" class="form" name="valor"
					value="<%=strhasta%>" maxlength="11" size="11" readonly /></td>
			</tr>
			<tr>
				<td width="8%">&nbsp;</td>
				<td width="12%" class="celdatabla">Aplica para el grupo
					familiar?</td>
				<td width="80%"><input type="text" class="form" name="valor"
					value="<%=strgrupo%>" maxlength="10" size="10" readonly /></td>
			</tr>
			<tr>
				<td width="8%">&nbsp;</td>
				<td width="12%" class="celdatabla">Se valida con la BD de
					Estudiantes</td>
				<td width="80%"><input type="text" class="form" name="valor"
					value="<%=strestudiantes%>" maxlength="10" size="10" readonly /></td>
			</tr>
			<tr>
				<td width="8%">&nbsp;</td>
				<td width="12%" class="celdatabla">Se valida con la BD de
					SISBEN?</td>
				<td width="80%"><input type="text" class="form" name="valor"
					value="<%=strsisben%>" maxlength="10" size="10" readonly /></td>
			</tr>
			<tr>
				<td width="8%">&nbsp;</td>
				<td width="12%" class="celdatabla">Vigencia</td>
				<td width="80%"><input type="text" class="form" name="vigencia"
					value="<%=strvigencia%>" maxlength="10" size="10" readonly /></td>
			</tr>
			<tr>
				<td width="8%">&nbsp;</td>
				<td width="12%" class="celdatabla">Administrador</td>
				<td width="80%"><input type="text" class="form"
					value="<%=stradmon%>" maxlength="30" size="30" readonly /></td>
			</tr>
			<tr>
				<td width="8%">&nbsp;</td>
				<td width="12%" class="celdatabla">&nbsp;</td>
				<td width="80%"></td>
			</tr>

			<tr>
				<td width="8%"></td>
				<td width="12%" class="celdatabla">
					<P>&nbsp;&nbsp;</P>
				</td>
				<td width="80%"><input type="hidden" name="ori" value="mod" />
					<input type="hidden" name="Subprograma" value="<%=strsubpgr%>" /></td>
			</tr>
		</table>
		</div>
		<P align="center">
			<a href="javascript:window.history.back()"> <img
				src="<%=request.getContextPath() + "/images/BACK1-1.gif"%>"
				border="0" />
			</a>
		</P>
		<P>
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		</P>
	</form>
	
	<P align="center">&nbsp;</P>
</body>
</html>
